<?php
declare (strict_types=1);

namespace app\admin\controller;

use ffhome\frame\controller\CrudController;
use ffhome\frame\model\BaseModel;

class CommonController extends CrudController
{
    /**
     * @var string 数据库表前缀
     */
    protected $prefix;

    protected function initialize()
    {
        parent::initialize();
        $this->prefix = config('database.connections.' . config('database.default') . '.prefix');
    }

    protected function assignConstant()
    {
        $this->assign('ENABLE', BaseModel::ENABLE);
    }
}